<template>

  <div class="form-container">
    <h1>欢迎来到宠物社区</h1>
    <el-form ref="form" :model="form" label-width="80px">
      <el-form-item label="用户名">
        <el-input v-model="form.name"></el-input>
      </el-form-item>
      <el-form-item label = "密码">
        <el-input
          v-model = "form.password"
          type="text"
          placeholder="请输入内容"
          maxlength="10"
          show-word-limit
        >
        </el-input>
      </el-form-item>


      <el-form-item label="身份选择">
        <el-select v-model="form.region" placeholder="请选择身份">
          <el-option label="普通用户" value="shanghai"></el-option>
          <el-option label="管理员" value="beijing"></el-option>
        </el-select>
      </el-form-item>


      <el-form-item>
        <el-button type="primary" @click="onSubmit">登录</el-button>
        <el-button>取消</el-button>
        <router-link to="/reg">注册</router-link>
      </el-form-item>

    </el-form>
  </div>

</template>
<script>

  export default {
    data() {
      return {

        form: {
          password:'',
          name: '',
          region: '',
          date1: '',
          date2: '',
          delivery: false,
          type: [],
          resource: '',
          desc: ''
        }
      }
    },
    methods: {
      onSubmit() {
        console.log('submit!');
      }
    }
  }
</script>
<style scoped>
  .form-container {
    display: grid;
    place-items: center;
    min-height: 50vh;
  }
</style>
